package com.njit.springboot.controller;

import com.njit.springboot.bean.RoncooUser;
import com.njit.springboot.mapper.RoncooUserMapper;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class ApiController {
    @Autowired
    private RoncooUserMapper roncooUserMapper;

    @ApiOperation(value = "查找", notes = "根据用户 ID 查找用户")
    @RequestMapping(value = "/select",method = RequestMethod.GET)
    public RoncooUser get(@RequestParam(defaultValue="1")Integer id){
        return roncooUserMapper.selectByPrimaryKey(id);

    }
}
